<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qwwbuttonlineedit.cpp -->
<head>
  <title>Qt 1.0: QwwButtonLineEdit Class Reference</title>
  <link href="classic-4.6.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">wwWidgets Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230">
<a href="http://www.wysota.eu.org/wwwidgets"><img src="images/ww-logo.png" align="right" width="137" height="41" border="0" /></a>
</td></tr></table><h1 class="title">QwwButtonLineEdit Class Reference</h1>
<p>A <a href="http://qt.nokia.com/doc/4.7/qlineedit.html">QLineEdit</a> with an integrated customizable button. <a href="#details">More...</a></p>
<pre> #include &lt;QwwButtonLineEdit&gt;</pre><p>Inherits <a href="http://qt.nokia.com/doc/4.7/qlineedit.html">QLineEdit</a>.</p>
<p>Inherited by <a href="qwwclearlineedit.html">QwwClearLineEdit</a>, <a href="qwwfilechooser.html">QwwFileChooser</a>, and <a href="qwwresetlineedit.html">QwwResetLineEdit</a>.</p>
<ul>
<li><a href="qwwbuttonlineedit-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#Position-enum">Position</a></b> { None, RightOutside, RightInside, LeftOutside, LeftInside }</td></tr>
</table>
<hr />
<a name="properties"></a>
<h2>Properties</h2>
<p><table class="propsummary" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="45%" valign="top"><ul>
<li><div class="fn"><b><a href="qwwbuttonlineedit.html#autoRaise-prop">autoRaise</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qwwbuttonlineedit.html#buttonFocusPolicy-prop">buttonFocusPolicy</a></b> : Qt::FocusPolicy</div></li>
<li><div class="fn"><b><a href="qwwbuttonlineedit.html#buttonPosition-prop">buttonPosition</a></b> : Position</div></li>
<li><div class="fn"><b><a href="qwwbuttonlineedit.html#buttonVisible-prop">buttonVisible</a></b> : bool</div></li>
</ul></td><td valign="top"><ul>
<li><div class="fn"><b><a href="qwwbuttonlineedit.html#icon-prop">icon</a></b> : QIcon</div></li>
<li><div class="fn"><b><a href="qwwbuttonlineedit.html#placeholderText-prop">placeholderText</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwwbuttonlineedit.html#regExp-prop">regExp</a></b> : QString</div></li>
</ul>
</td></tr>
</table></p>
<ul>
<li><div bar="2" class="fn"></div>17 properties inherited from <a href="http://qt.nokia.com/doc/4.7/qlineedit.html#properties">QLineEdit</a></li>
<li><div bar="2" class="fn"></div>58 properties inherited from <a href="http://qt.nokia.com/doc/4.7/qwidget.html#properties">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 property inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#properties">QObject</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#QwwButtonLineEdit">QwwButtonLineEdit</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#QwwButtonLineEdit-2">QwwButtonLineEdit</a></b> ( const QString &amp; <i>contents</i>, QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#autoRaise-prop">autoRaise</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::FocusPolicy </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#buttonFocusPolicy-prop">buttonFocusPolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#buttonVisible-prop">buttonIsVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Position </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#buttonPosition-prop">buttonPosition</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QIcon </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#icon-prop">icon</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#placeholderText-prop">placeholderText</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#regExp-prop">regExp</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#buttonFocusPolicy-prop">setButtonFocusPolicy</a></b> ( Qt::FocusPolicy )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#buttonPosition-prop">setButtonPosition</a></b> ( Position <i>pos</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>53 public functions inherited from <a href="http://qt.nokia.com/doc/4.7/qlineedit.html#public-functions">QLineEdit</a></li>
<li><div bar="2" class="fn"></div>217 public functions inherited from <a href="http://qt.nokia.com/doc/4.7/qwidget.html#public-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>13 public functions inherited from <a href="http://qt.nokia.com/doc/4.7/qpaintdevice.html#public-functions">QPaintDevice</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-functions">QObject</a></li>
</ul>
<hr />
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#autoRaise-prop">setAutoRaise</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#buttonVisible-prop">setButtonVisible</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#icon-prop">setIcon</a></b> ( const QIcon &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#placeholderText-prop">setPlaceholderText</a></b> ( const QString &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#regExp-prop">setRegExp</a></b> ( const QString &amp; <i>v</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#regExp-prop">setRegExp</a></b> ( const QRegExp &amp; <i>rx</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>8 public slots inherited from <a href="http://qt.nokia.com/doc/4.7/qlineedit.html#public-slots">QLineEdit</a></li>
<li><div bar="2" class="fn"></div>19 public slots inherited from <a href="http://qt.nokia.com/doc/4.7/qwidget.html#public-slots">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 public slot inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-slots">QObject</a></li>
</ul>
<hr />
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#buttonClicked">buttonClicked</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#validatorChanged">validatorChanged</a></b> ( const QString &amp; <i>regexp</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>6 signals inherited from <a href="http://qt.nokia.com/doc/4.7/qlineedit.html#signals">QLineEdit</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="http://qt.nokia.com/doc/4.7/qwidget.html#signals">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#signals">QObject</a></li>
</ul>
<hr />
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QToolButton * </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#button">button</a></b> () const</td></tr>
</table>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwwbuttonlineedit.html#paintEvent">paintEvent</a></b> ( QPaintEvent * )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>17 protected functions inherited from <a href="http://qt.nokia.com/doc/4.7/qlineedit.html#protected-functions">QLineEdit</a></li>
<li><div bar="2" class="fn"></div>37 protected functions inherited from <a href="http://qt.nokia.com/doc/4.7/qwidget.html#protected-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="http://qt.nokia.com/doc/4.7/qpaintdevice.html#protected-functions">QPaintDevice</a></li>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>1 public type inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-variables">QObject</a></li>
<li><div class="fn"></div>4 static public members inherited from <a href="http://qt.nokia.com/doc/4.7/qwidget.html#static-public-members">QWidget</a></li>
<li><div class="fn"></div>4 static public members inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>1 protected slot inherited from <a href="http://qt.nokia.com/doc/4.7/qwidget.html#protected-slots">QWidget</a></li>
<li><div class="fn"></div>1 protected type inherited from <a href="http://qt.nokia.com/doc/4.7/qpaintdevice.html#protected-variables">QPaintDevice</a></li>
<li><div class="fn"></div>2 protected variables inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>A <a href="http://qt.nokia.com/doc/4.7/qlineedit.html">QLineEdit</a> with an integrated customizable button.</p>
<p>The control is a line edit that contains a tool button can hold an icon and can be set either on the right or the left side of the line edit and can occupy space inside or outside the line edit.</p>
<p align="center"><img src="images/qwwbuttonlineedit1.png" alt="QwwButtonLineEdit" /></p><p align="center"><img src="images/qwwbuttonlineedit2.png" alt="QwwButtonLineEdit" /></p><p>It can be used to associate an easy to access action with the line edit, i.e&#x2e; that will modify contents of the box in a definable way.</p>
<p>Using <a href="http://qt.nokia.com/doc/4.7/qwidget.html#addAction">QWidget::addAction</a>() one can associate more than one action with the button.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="Position-enum"></a>enum QwwButtonLineEdit::Position</h3>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QwwButtonLineEdit::None</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Button is not visible</td></tr>
<tr><td valign="top"><tt>QwwButtonLineEdit::RightOutside</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Button is positioned on the right side of the line edit.</td></tr>
<tr><td valign="top"><tt>QwwButtonLineEdit::RightInside</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Button is positioned inside the line edit on the right.</td></tr>
<tr><td valign="top"><tt>QwwButtonLineEdit::LeftOutside</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Button is positioned on the left side of the line edit.</td></tr>
<tr><td valign="top"><tt>QwwButtonLineEdit::LeftInside</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">Button is positioned inside the line edit on the left.</td></tr>
</table></p>
<hr />
<h2>Property Documentation</h2>
<h3 class="fn"><a name="autoRaise-prop"></a>autoRaise : bool</h3>
<p>This property holds this property holds whether auto-raising is enabled or not.</p>
<p>The default is disabled (i.e&#x2e; false).</p>
<p>This property is currently ignored on Mac OS X when using <a href="http://qt.nokia.com/doc/4.7/qmacstyle.html">QMacStyle</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>autoRaise</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAutoRaise</b> ( bool )</td></tr>
</table>
<h3 class="fn"><a name="buttonFocusPolicy-prop"></a>buttonFocusPolicy : <a href="http://qt.nokia.com/doc/4.7/qt.html#FocusPolicy-enum">Qt::FocusPolicy</a></h3>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::FocusPolicy </td><td class="memItemRight" valign="bottom"><b>buttonFocusPolicy</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setButtonFocusPolicy</b> ( Qt::FocusPolicy )</td></tr>
</table>
<h3 class="fn"><a name="buttonPosition-prop"></a>buttonPosition : <a href="qwwbuttonlineedit.html#Position-enum">Position</a></h3>
<p>This property holds the position of the button relative to the line edit.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Position </td><td class="memItemRight" valign="bottom"><b>buttonPosition</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setButtonPosition</b> ( Position <i>pos</i> )</td></tr>
</table>
<h3 class="fn"><a name="buttonVisible-prop"></a>buttonVisible : bool</h3>
<p>This property holds information whether the button is visible.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>buttonIsVisible</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setButtonVisible</b> ( bool )</td></tr>
</table>
<p>See also <a href="qwwbuttonlineedit.html#button">button</a>() and <a href="qwwbuttonlineedit.html#buttonPosition-prop">buttonPosition</a>.</p>
<h3 class="fn"><a name="icon-prop"></a>icon : <a href="http://qt.nokia.com/doc/4.7/qicon.html">QIcon</a></h3>
<p>This property holds the icon shown on the button</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QIcon </td><td class="memItemRight" valign="bottom"><b>icon</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setIcon</b> ( const QIcon &amp; )</td></tr>
</table>
<h3 class="fn"><a name="placeholderText-prop"></a>placeholderText : <a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></h3>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>placeholderText</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setPlaceholderText</b> ( const QString &amp; )</td></tr>
</table>
<h3 class="fn"><a name="regExp-prop"></a>regExp : <a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></h3>
<p>This property holds the regular expression used to validate contents of the widget</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>regExp</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setRegExp</b> ( const QString &amp; <i>v</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setRegExp</b> ( const QRegExp &amp; <i>rx</i> )</td></tr>
</table>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QwwButtonLineEdit"></a>QwwButtonLineEdit::QwwButtonLineEdit ( <a href="http://qt.nokia.com/doc/4.7/qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a button line edit with a given <i>parent</i>.</p>
<h3 class="fn"><a name="QwwButtonLineEdit-2"></a>QwwButtonLineEdit::QwwButtonLineEdit ( const <a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a> &amp; <i>contents</i>, <a href="http://qt.nokia.com/doc/4.7/qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a button line edit with a given <i>parent</i> and sets its text to <i>contents</i>.</p>
<h3 class="fn"><a name="button"></a><a href="http://qt.nokia.com/doc/4.7/qtoolbutton.html">QToolButton</a> * QwwButtonLineEdit::button () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Returns a pointer to the button.</p>
<h3 class="fn"><a name="buttonClicked"></a>void QwwButtonLineEdit::buttonClicked ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the button is clicked.</p>
<h3 class="fn"><a name="paintEvent"></a>void QwwButtonLineEdit::paintEvent ( <a href="http://qt.nokia.com/doc/4.7/qpaintevent.html">QPaintEvent</a> * )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<h3 class="fn"><a name="validatorChanged"></a>void QwwButtonLineEdit::validatorChanged ( const <a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a> &amp; <i>regexp</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>Signal emitted when the validator of the line edit changes to <i>regexp</i></p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%" align="left">Copyright &copy; 2007-2010 Witold Wysota 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">wwWidgets 1.0.0</div></td>
</tr></table></div></address></body>
</html>
